<!DOCTYPE html>
<html>
    <head>
        <title>个人中心</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="Content-Language" content="zh-CN" />
        <meta http-equiv="Content-Script-Type" content="text/javascript" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
        <meta name="format-detection" content="telephone=no"/>
		<link rel="stylesheet" href="css/bootstrap.min.css">
		<link rel="stylesheet" type="text/css" href="css/index.css"/>
    </head>
	<body>
		<div class="col-xs-12 background">
			<div class="col-xs-12 head">
				<img class="heads" src="images/icon_4.png" />
			</div>
			<div class="col-xs-12 name" data-model="companyName" >
			</div>
		</div>
		<div class="content col-xs-12 userinfo">
			<div class="col-xs-12 top_top_1" style="border-bottom: 1px solid #ececec;">
				<div class="col-xs-6">
					<img class="icon_img" src="images/icon_i_1.jpg" />&nbsp;&nbsp;账户名称
				</div>
				<div class="col-xs-6" data-model="userName" >
				</div>
			</div>
			<div class="col-xs-12 top_top_2"  style="border-bottom: 1px solid #ececec;">
				<div class="col-xs-6">
					<img class="icon_img" src="images/icon_i_2.jpg" />&nbsp;&nbsp;邮箱
				</div>
				<div class="col-xs-6" data-model="email">
				</div>
			</div> 
			<div class="col-xs-12 top_top_2"  style="border-bottom: 1px solid #ececec;">
				<div class="col-xs-6" >
					<img class="icon_img" src="images/icon_i_3.jpg" />&nbsp;&nbsp;手机号  
				</div>
				<div class="col-xs-6"  data-model="phone">
				</div>
			</div>
			<div class="col-xs-12 bottom_bottom logout">
				<a href="javascript:;">退出登录</a>
			</div>
		</div>
		<div class="col-xs-12 bot navigates">
			<div class="col-xs-3 nav" data-model="home" >
				<div class="myReport active">
					<div class="icon_1 icon" ></div>
					<div class="wz">统计</div>
				</div>
			</div>
			<div class="col-xs-3 nav" data-model="project" >
				<div class="myReport">
					<div class="icon_2 icon" ></div>
					<div class="wz">项目</div>
				</div>
			</div>
			<div class="col-xs-3 nav" data-model="news" >
				<div class="myReport">
					<div class="icon_3 icon" ></div>
					<div class="wz">消息</div>
				</div>
			</div>
			<div class="col-xs-3 nav" data-model="member" >
				<div class="myReport active">
					<div class="icon_4 icon active" ></div>
					<div class="wz active">我的</div>
				</div>
			</div>
		</div>
	</body>
</html>
<script src="js/mui.min.js"></script> 
<script src="js/project.config.js"></script>
<script src="js/jquery.min.js"></script>
<script> 
	mui.plusReady(function(){
		var token = get_token();
		var _dom = $(".userinfo .col-xs-12 .col-xs-6 .right");
		var _this = _html = '';
		$(".name").html(plus.storage.getItem("companyName"));
		mui.each(_dom,function(i,v){
			_this = $(this);
			switch(_this.data('model')){
				case 'userName':
					_html = plus.storage.getItem("userName");
					break;
				case 'email':
					_html = plus.storage.getItem("email")+'<div class="right-arrow"></div>';
					break;
				case 'phone':
					_html = plus.storage.getItem("phone")+'<div class="right-arrow"></div>';
					break;
			}
			_this.html(_html);
		});
		var data = {};
		data.api = 'logout';
		data.token = token;
		mui(".userinfo").on('tap','.logout',function(){
			mui.ajax(project_cofnig.service_url, {
				async: true,
				dataType: 'json',
				data: data,
				success: function (ref) {
					plus.storage.setItem("token","logout");
					_mui_dialog._toast(ref.message);
					if(ref.code == 0){
						redirect();
					}
				}
			});
		});
		mui(".navigates").on('tap','.nav',function(){
				var model = $(this).data('model');
				var url = '';
				if(model != 'member' ){
					switch(model){
						case 'project':
							url = 'lists.html';
							break;
						case 'news':
							url = 'news.html';
							break;
						case 'member':
							url = 'userinfo.html';
							break;
						default:
							url = 'home.html';
					}
					redirect(url);
				}
				return false;
		});
	});
</script>
		 